package com.unify.python.analysis.template;

import java.io.*;
import java.util.Map;

/**
 * @Author: wchen
 * @Description:
 * @Date: Created in 2018-12-19 17:50
 * Copyright 本内容仅限于杭州阿拉丁信息科技股份有限公司内部传阅，禁止外泄以及用于其他的商业目的
 */
public class TemplateExtract {



    public String extractKeyWords() {
        try {
            String path = this.getClass().getClassLoader().getResource("template/index.tl").getPath();
            System.out.println(path);
            InputStreamReader isr = new InputStreamReader(new FileInputStream(path), "gbk");

            BufferedReader br = new BufferedReader(isr);
            String lineTxt = null;
            StringBuffer stringBuffer = new StringBuffer();
            while ((lineTxt = br.readLine()) != null) {
                stringBuffer.append(lineTxt);
            }
            br.close();
            return stringBuffer.toString();
        }catch (Exception e){
            e.printStackTrace();
            return null;
        }

    }

    public static void main(String[] args) throws Exception {
        TemplateExtract extract = new TemplateExtract();
        extract.extractKeyWords();
    }
}
